from wtforms import StringField, PasswordField, BooleanField, SubmitField, Form
from wtforms.validators import length, email, DataRequired


class AnswerForm(Form):
    question_type = StringField('question_type', validators=[DataRequired()])
    my_answer = StringField('my_answer', validators=[DataRequired(message="答案不能为空!")])
    question_id = StringField('question_id', validators=[DataRequired()])


class AddStudentForm(Form):
    id_classes = StringField('id_classes', validators=[DataRequired()])
    username = StringField('username', validators=[DataRequired()])
    password = StringField('password', validators=[DataRequired()])
    name = StringField('name', validators=[DataRequired()])
    phone = StringField('phone', validators=[DataRequired()])
    parent_phone = StringField('parent_phone', validators=[DataRequired()])
    age = StringField('age', validators=[DataRequired()])
    material_cost = StringField('material_cost', validators=[DataRequired()])


class AddTestPaperForm(Form):
    name = StringField('name', validators=[DataRequired(message="试卷名不能为空!")])
    id_classes = StringField('id_classes', validators=[DataRequired(message="班级不能为空!")])
